<fieldset>
<table>
  <tr>
    <td width="300"></td>
	<td />
  </tr>
  
<% for department in @departments %>
  <tr>
  <% for column in Department.content_columns %>
    <td><%=h department.send(column.name) %></td>
  <% end %>
	<td><%= link_to 'Mostrar', :action => 'show', :id => department %> |
	<%= link_to 'Editar', :action => 'edit', :id => department %> |
    <%= link_to 'Excluir', { :action => 'destroy', :id => department }, :confirm => 'Deseja mesmo deletar?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= link_to 'Anterior', { :page => @department_pages.current.previous } if @department_pages.current.previous %>
<%= link_to 'Pr&oacute;xima', { :page => @department_pages.current.next } if @department_pages.current.next %> 
</fieldset>
<p>
<%= link_to 'Adicionar departmento', :action => 'new' %>
</p>

<p>
  <h2>Op&ccedil;&otilde;es relacionadas:</h2>
  &bull; <%= link_to 'Gerenciar usu&aacute;rios', :controller => 'users', :action => 'list_users'%>
</p>
